
#ifndef WRITE_MESH_PROCESS_H
#define WRITE_MESH_PROCESS_H

#include <string>
#include "datakit.h"
#include <memory>
#include "WriterBase.hpp"
#include "WriteProcess.hpp"

namespace  AMCAX::Exchange 
{
    class MeshWriteProcess : public WriteProcessBase
    {
    public:
        explicit MeshWriteProcess(Dtk_string inputFile, std::unique_ptr<WriterBase> writer);
        //~ParasolidWriteProcess() override;

        //write through assemblies
        Dtk_ErrorStatus WriteDocument(Dtk_MainDocPtr inDocument, const std::string& outputFile) override;
        Dtk_ErrorStatus WriteComponent(Dtk_ComponentPtr inComponent, const Dtk_transfo &inMatrix, bool bCreateFile = false) override;
        Dtk_ErrorStatus WriteInstance(Dtk_ComponentPtr inComponent) override;
        Dtk_ErrorStatus WritePrototype(Dtk_ComponentPtr inComponent, const Dtk_transfo &inMatrix, Dtk_ID& outPrototypeId) override;

     private:
        Dtk_tab<Dtk_ID> m_componentProcessed;
        std::unordered_map<Dtk_ID, Dtk_ID> m_mpComponentProcessed; 
        Dtk_tab<Dtk_ID> m_stkAssembly;
    };
}

#endif